#include<iostream>
using namespace std;
int a[10],n,j,i;

int main()
{ int aux;
  cout<<"n=";cin>>n;
for(i=1;i<=n;i++)
{ cout<<"a["<<i<<"]=";
  cin>>a[i];
}

for(i=1;i<=n-1;i++)
  for(j=i+1;j<=n-1;j++)
   if(a[i]>a[j])
     {aux=a[i];
      a[i]=a[j];
      a[j]=aux;
     }
cout<<"vectorul sortat este: ";cout<<endl;
for(i=1;i<=n;i++)
cout<<a[i];
}	
